package main

import (
	"fmt"
	"imooc-rabbitmq/RabbitMQ"
	"strconv"
	"time"
)

func main() {
	imooc_one := RabbitMQ.NewRabbitMQRouting("imoocExchange", "imooc_one")
	imooc_two := RabbitMQ.NewRabbitMQRouting("imoocExchange", "imooc_two")
	for i := 0; i < 100; i++ {
		imooc_one.PublishRouting("路由模式 imooc_one 生成第" + strconv.Itoa(i) + "条数据")
		imooc_two.PublishRouting("路由模式 imooc_two 生成第" + strconv.Itoa(i) + "条数据")
		fmt.Println("发送成功: " + "第" + strconv.Itoa(i) + "条数据")
		time.Sleep(time.Second * 1)
	}
}
